package io.renren.modules.app.dao;

import io.renren.modules.app.entity.ImGroupUserEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 *
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-05-19 09:24:32
 */
@Mapper
public interface ImGroupUserDao extends BaseMapper<ImGroupUserEntity> {

    @Select("SELECT igu.id,igu.user_id,igu.nickname,u.nickname usernickname,u.avatar,u.username FROM im_group_user igu,tb_user u WHERE igu.user_id=u.user_id and igu.group_id=#{id}")
    List<ImGroupUserEntity> getList(Integer id);
}
